type Expand<T> = {
    [P in keyof T]: T[P]
}
 
type PartialByKeys<T extends Record<string, any>, K = keyof T> = Expand<{
    [P in Exclude<keyof T, K>]: T[P];
} & {
    [P in Extract<keyof T, K>]?: T[P]
}>

// 交叉类型需要重新遍历一下才能真正组合完成